# Maintainer: Morgan <morganamilo@archlinux.org>

pkgname=cargo-feature
pkgver=0.7.0
pkgrel=1
pkgdesc="Conveniently modify dependency features"
url="https://github.com/Riey/$pkgname"
source=($pkgname-$pkgver::https://github.com/Riey/$pkgname/archive/v$pkgver.tar.gz)
arch=("loong64" "x86_64")
license=("MIT")
depends=("cargo")
sha256sums=('5b88c1380f1bd6f3d7168137f08a6a534194d21254435a520c39a616398721f8')

build() {
    cd "$srcdir/$pkgname-$pkgver"

    cargo build --locked --release --target-dir target
}

package() {
    cd "$srcdir/$pkgname-$pkgver"

    install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin/"
    install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
